package com.boho.system.action;


             
/**
 * 
 *
 * @File name:  UpdateTSysUserPWDAction.java   修改【系统后台用户:T_USER】
 * @Create on:  2010-05-10 11:27:203
 * @Author   :  陈伟
 *
 * @ChangeList
 * ---------------------------------------------------
 * Date         Editor              ChangeReasons
 *
 */
           
        


            
import cn.boho.framework.actions.ActionImp;
import cn.boho.framework.context.ActionContext;
import cn.boho.framework.exception.UserOperationException;
import cn.boho.framework.service.MessageService;

import com.boho.system.service.UserService;


            
        
public class UpdateTSysUserPWDAction extends ActionImp {
	
	@Override
	protected void doException(ActionContext atx, Exception ex) {
		if (!(ex instanceof UserOperationException)) {
			atx.setErrorContext("BOHO_COMMON_1002", MessageService.getMessage("BOHO_COMMON_1002"),"【系统后台用户密码】" ,ex);
		}
	}
	@Override
	protected int performExecute(ActionContext atx) throws Exception {
		String oldPWD = atx.getStringValue("OLDPWD");
		String newPWD = atx.getStringValue("NEWPWD");
		UserService.updateUserPWD(atx, oldPWD, newPWD);
		return 1;
	}
	@Override
	protected int verifyParameters(ActionContext atx) throws Exception {
		return 1;
	}
}
